﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
	组织添加修改
</title>
    <base target="_self" />
    <link href="Styles/ts_css.css" rel="stylesheet" type="text/css" /><link href="../Styles/css.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
    <script src="Scripts/jquery.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(function () {
            //必填项验证
            $("#isShows").hide();
            var typeval = $("#ddEmployeesType").find("option:selected").val();
            if (typeval == "1") {
                $("#isShows").show();
            }
            $("#btnSubmit").click(function () {
                var name = $("#txtName").val();
                if (name == "" || name == null) {
                    alert("请填写组织名称");
                    return false;
                }
                if (name.length > 50) {
                    alert("组织名称输入过长");
                    return false;
                }
                var typeval = $("#ddEmployeesType").find("option:selected").val();
                if (typeval == "1") {
                    var alias = $("#txtAlias").val();
                    if (alias == "" || alias == null) {
                        alert("广场编号不能为空");
                        return false;
                    }

                    var partten = /^[a-zA-Z]*$/;
                    if (!partten.exec(alias) || alias.length < 4) {
                        alert("广场编号格式不正确，只能输入4位英文字母");
                        return false;
                    }

                }
                var comment = $("#txtComment").val();
                if (comment.length > 0) {
                    if (comment.length > 1000) {
                        alert("备注输入超过有限长度,最多1000个字符");
                        return false;
                    }
                }
            });
            $("#ddEmployeesType").change(function () {
                var typeval = $("#ddEmployeesType").find("option:selected").val();
                if (typeval == "1") {
                    $("#txtAlias").val($("#hidAlias").val());
                    $("#isShows").show();
                } else {
                    $("#isShows").hide();
                }
            });
        });
        function page_Close() {
            if (window.parent != null) {
                window.parent.close();
            }
            else {
                window.close();
            }
        }
    </script>
</head>
<body>
 <form method="post" action="OrganizationsUpdateManager.htm" id="form1">

    <table width="100%" border="0" cellpadding="2" cellspacing="2" class="table_list1">
        <tr>
            <td width="10%" class="table_list1_style1">
                <font class="red">*</font> 父节点名称
            </td>
            <td width="20%" class="table_list1_style2">
                <input name="txtNamePath" type="text" value="大连万达商业地产股份有限公司-商管公司" readonly="readonly" id="txtNamePath" style="width:98%;" />
            </td>
            <td width="10%" class="table_list1_style1">
                &nbsp;<font class="red">*</font> 组织名称
            </td>
            <td width="20%" class="table_list1_style2">
                <font class="red">
                    <input name="txtName" type="text" value="商管公司" maxlength="50" id="txtName" style="width:98%;" />
                </font>
            </td>
            <td width="10%" class="table_list1_style1">
                <font class="red">*</font>组织类型
            </td>
            <td width="20%" class="table_list1_style2">
                <select name="ddEmployeesType" id="ddEmployeesType" style="width:98%;">
	<option selected="selected" value="0">部门</option>
	<option value="1">广场</option>
	<option value="2">区域</option>
 
</select>
            </td>
        </tr>
        <tr id="isShows">
	<td width="12%" class="table_list1_style1">
                <font class="red">*</font>广场编号
            </td>
	<td width="20%" class="table_list1_style2">
                <input name="txtAlias" type="text" maxlength="4" id="txtAlias" style="width:98%;" />
            </td>
	<td width="12%" class="table_list1_style1">
                <font class="red">*</font>是否直属
            </td>
	<td width="20%" class="table_list1_style2">
                <table id="radioIsDirectlyUnder">
		<tr>
			<td><input id="radioIsDirectlyUnder_0" type="radio" name="radioIsDirectlyUnder" value="0" checked="checked" /><label for="radioIsDirectlyUnder_0">是</label></td><td><input id="radioIsDirectlyUnder_1" type="radio" name="radioIsDirectlyUnder" value="1" /><label for="radioIsDirectlyUnder_1">否</label></td>
		</tr>
	</table>
            </td>
	<td width="12%" class="table_list1_style1">
            </td>
	<td width="20%" class="table_list1_style2">
            </td>
</tr>
 
        <tr>
            <td class="table_list1_style1">
                备注
            </td>
            <td colspan="5" class="table_list1_style2">
                <textarea name="txtComment" rows="5" cols="20" id="txtComment" style="width:98%;">
</textarea>
            </td>
        </tr>
    </table>
    <div class="operate">
        <ul>
            <li>
                <input type="button" name="btnSubmit" value="修改" id="btnSubmit" class="button" />
            </li>
            <li>
                <input id="btnBack" type="button" class="button" value="关闭" onclick="page_Close()" />
            </li>
        </ul>
    </div>
    <input type="hidden" name="hidAlias" id="hidAlias" />
    <input type="hidden" name="hidorganizationId" id="hidorganizationId" />
   </form>
</body>
</html>

